package com.zjw.concurrency.juc.threadlocal;

public class ThreadLocalNPE {

    ThreadLocal<Long> longThreadLocal = new ThreadLocal<>();


    public void setValue(){
        longThreadLocal.set(Thread.currentThread().getId());
    }

    public void getValue(){
        System.out.println(longThreadLocal.get());
    }



    public static void main(String[] args) {
        ThreadLocalNPE threadLocalNPE = new ThreadLocalNPE();
        threadLocalNPE.setValue();
        threadLocalNPE.getValue();
    }
}
